package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;

import com.sa.ibiz.demo.demo.domain.WFInstance;
import com.sa.ibiz.demo.demo.domain.WFStep;
import com.sa.ibiz.demo.demo.domain.WFUser;

/**
 * 实体[WFStepData] 数据对象
 */
@TableName(value = "T_SRFWFSTEPDATA",resultMap = "WFStepDataResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class WFStepData extends EntityBase implements Serializable{

    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFInstance wfinstance;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFStep wfstep;
    @JSONField(serialize = false)
    @JsonIgnore
    @TableField(exist = false)//关系主表数据
    private WFUser originalwfuser;
    @TableField(exist = false)//逻辑属性
    private Timestamp actiontime;
    private String actorid;
    private String actorname;
    private String actorname2;
    private String connectionname;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    private String memo;
    private String nextto;
    private String originalwfuserid;
    private String originalwfusername;
    private String sdparam;
    private String sdparam2;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    private String userdata;
    private String userdatadesc;
    private String wfactionlanrestag;
    private String wfinstanceid;
    private String wfinstancename;
    private String wfplogicname;
    @TableId(value= "wfstepdataid",type=IdType.UUID)//指定主键生成策略
    private String wfstepdataid;
    private String wfstepdataname;
    private String wfstepid;
    private String wfsteplanrestag;
    private String wfstepname;
    /**
     *  设置属性值[操作时间]
     *  @param actiontime
     */
    public void setActiontime(Timestamp actiontime){
        this.actiontime = actiontime;
        this.set("actiontimedirtyflag",true);
    }
    /**
     *  获取属性值[操作时间]
     */
    public Timestamp getActiontime(){
        return this.actiontime;
    }
    /**
     *  重置属性值[操作时间]
     */
    public void resetActiontime(){
        this.set("actiontimedirtyflag",false);
        this.actiontime = null;
    }
    /**
     *  设置属性值[操作人]
     *  @param actorid
     */
    public void setActorid(String actorid){
        if(StringUtils.isEmpty(actorid))
            actorid=null;
        this.actorid = actorid;
        this.set("actoriddirtyflag",true);
    }
    /**
     *  获取属性值[操作人]
     */
    public String getActorid(){
        return this.actorid;
    }
    /**
     *  重置属性值[操作人]
     */
    public void resetActorid(){
        this.set("actoriddirtyflag",false);
        this.actorid = null;
    }
    /**
     *  设置属性值[操作人名称]
     *  @param actorname
     */
    public void setActorname(String actorname){
        if(StringUtils.isEmpty(actorname))
            actorname=null;
        this.actorname = actorname;
        this.set("actornamedirtyflag",true);
    }
    /**
     *  获取属性值[操作人名称]
     */
    public String getActorname(){
        return this.actorname;
    }
    /**
     *  重置属性值[操作人名称]
     */
    public void resetActorname(){
        this.set("actornamedirtyflag",false);
        this.actorname = null;
    }
    /**
     *  设置属性值[代办人名称]
     *  @param actorname2
     */
    public void setActorname2(String actorname2){
        if(StringUtils.isEmpty(actorname2))
            actorname2=null;
        this.actorname2 = actorname2;
        this.set("actorname2dirtyflag",true);
    }
    /**
     *  获取属性值[代办人名称]
     */
    public String getActorname2(){
        return this.actorname2;
    }
    /**
     *  重置属性值[代办人名称]
     */
    public void resetActorname2(){
        this.set("actorname2dirtyflag",false);
        this.actorname2 = null;
    }
    /**
     *  设置属性值[连接名称]
     *  @param connectionname
     */
    public void setConnectionname(String connectionname){
        if(StringUtils.isEmpty(connectionname))
            connectionname=null;
        this.connectionname = connectionname;
        this.set("connectionnamedirtyflag",true);
    }
    /**
     *  获取属性值[连接名称]
     */
    public String getConnectionname(){
        return this.connectionname;
    }
    /**
     *  重置属性值[连接名称]
     */
    public void resetConnectionname(){
        this.set("connectionnamedirtyflag",false);
        this.connectionname = null;
    }
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[内容]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[内容]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[内容]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[下一步]
     *  @param nextto
     */
    public void setNextto(String nextto){
        if(StringUtils.isEmpty(nextto))
            nextto=null;
        this.nextto = nextto;
        this.set("nexttodirtyflag",true);
    }
    /**
     *  获取属性值[下一步]
     */
    public String getNextto(){
        return this.nextto;
    }
    /**
     *  重置属性值[下一步]
     */
    public void resetNextto(){
        this.set("nexttodirtyflag",false);
        this.nextto = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfuserid
     */
    public void setOriginalwfuserid(String originalwfuserid){
        if(StringUtils.isEmpty(originalwfuserid))
            originalwfuserid=null;
        this.originalwfuserid = originalwfuserid;
        this.set("originalwfuseriddirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfuserid(){
        return this.originalwfuserid;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfuserid(){
        this.set("originalwfuseriddirtyflag",false);
        this.originalwfuserid = null;
    }
    /**
     *  设置属性值[源流程用户]
     *  @param originalwfusername
     */
    public void setOriginalwfusername(String originalwfusername){
        if(StringUtils.isEmpty(originalwfusername))
            originalwfusername=null;
        this.originalwfusername = originalwfusername;
        this.set("originalwfusernamedirtyflag",true);
    }
    /**
     *  获取属性值[源流程用户]
     */
    public String getOriginalwfusername(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.originalwfusername)&&(!StringUtils.isEmpty(this.getOriginalwfuserid())) && this.getOriginalwfuser()!=null)
        {
            this.originalwfusername = this.getOriginalwfuser().getWfusername();
            this.set("originalwfusernamedirtyflag",true);
        }
        return this.originalwfusername;
    }
    /**
     *  重置属性值[源流程用户]
     */
    public void resetOriginalwfusername(){
        this.set("originalwfusernamedirtyflag",false);
        this.originalwfusername = null;
    }
    /**
     *  设置属性值[SDPARAM]
     *  @param sdparam
     */
    public void setSdparam(String sdparam){
        if(StringUtils.isEmpty(sdparam))
            sdparam=null;
        this.sdparam = sdparam;
        this.set("sdparamdirtyflag",true);
    }
    /**
     *  获取属性值[SDPARAM]
     */
    public String getSdparam(){
        return this.sdparam;
    }
    /**
     *  重置属性值[SDPARAM]
     */
    public void resetSdparam(){
        this.set("sdparamdirtyflag",false);
        this.sdparam = null;
    }
    /**
     *  设置属性值[代办人]
     *  @param sdparam2
     */
    public void setSdparam2(String sdparam2){
        if(StringUtils.isEmpty(sdparam2))
            sdparam2=null;
        this.sdparam2 = sdparam2;
        this.set("sdparam2dirtyflag",true);
    }
    /**
     *  获取属性值[代办人]
     */
    public String getSdparam2(){
        return this.sdparam2;
    }
    /**
     *  重置属性值[代办人]
     */
    public void resetSdparam2(){
        this.set("sdparam2dirtyflag",false);
        this.sdparam2 = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     *  设置属性值[用户数据标识]
     *  @param userdata
     */
    public void setUserdata(String userdata){
        if(StringUtils.isEmpty(userdata))
            userdata=null;
        this.userdata = userdata;
        this.set("userdatadirtyflag",true);
    }
    /**
     *  获取属性值[用户数据标识]
     */
    public String getUserdata(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.userdata)&&(!StringUtils.isEmpty(this.getWfinstanceid())) && this.getWfinstance()!=null)
        {
            this.userdata = this.getWfinstance().getUserdata();
            this.set("userdatadirtyflag",true);
        }
        return this.userdata;
    }
    /**
     *  重置属性值[用户数据标识]
     */
    public void resetUserdata(){
        this.set("userdatadirtyflag",false);
        this.userdata = null;
    }
    /**
     *  设置属性值[用户数据]
     *  @param userdatadesc
     */
    public void setUserdatadesc(String userdatadesc){
        if(StringUtils.isEmpty(userdatadesc))
            userdatadesc=null;
        this.userdatadesc = userdatadesc;
        this.set("userdatadescdirtyflag",true);
    }
    /**
     *  获取属性值[用户数据]
     */
    public String getUserdatadesc(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.userdatadesc)&&(!StringUtils.isEmpty(this.getWfinstanceid())) && this.getWfinstance()!=null)
        {
            this.userdatadesc = this.getWfinstance().getUserdatainfo();
            this.set("userdatadescdirtyflag",true);
        }
        return this.userdatadesc;
    }
    /**
     *  重置属性值[用户数据]
     */
    public void resetUserdatadesc(){
        this.set("userdatadescdirtyflag",false);
        this.userdatadesc = null;
    }
    /**
     *  设置属性值[操作类型语言资源]
     *  @param wfactionlanrestag
     */
    public void setWfactionlanrestag(String wfactionlanrestag){
        if(StringUtils.isEmpty(wfactionlanrestag))
            wfactionlanrestag=null;
        this.wfactionlanrestag = wfactionlanrestag;
        this.set("wfactionlanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[操作类型语言资源]
     */
    public String getWfactionlanrestag(){
        return this.wfactionlanrestag;
    }
    /**
     *  重置属性值[操作类型语言资源]
     */
    public void resetWfactionlanrestag(){
        this.set("wfactionlanrestagdirtyflag",false);
        this.wfactionlanrestag = null;
    }
    /**
     *  设置属性值[WFInstanceId]
     *  @param wfinstanceid
     */
    public void setWfinstanceid(String wfinstanceid){
        if(StringUtils.isEmpty(wfinstanceid))
            wfinstanceid=null;
        this.wfinstanceid = wfinstanceid;
        this.set("wfinstanceiddirtyflag",true);
    }
    /**
     *  获取属性值[WFInstanceId]
     */
    public String getWfinstanceid(){
        return this.wfinstanceid;
    }
    /**
     *  重置属性值[WFInstanceId]
     */
    public void resetWfinstanceid(){
        this.set("wfinstanceiddirtyflag",false);
        this.wfinstanceid = null;
    }
    /**
     *  设置属性值[流程实例]
     *  @param wfinstancename
     */
    public void setWfinstancename(String wfinstancename){
        if(StringUtils.isEmpty(wfinstancename))
            wfinstancename=null;
        this.wfinstancename = wfinstancename;
        this.set("wfinstancenamedirtyflag",true);
    }
    /**
     *  获取属性值[流程实例]
     */
    public String getWfinstancename(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfinstancename)&&(!StringUtils.isEmpty(this.getWfinstanceid())) && this.getWfinstance()!=null)
        {
            this.wfinstancename = this.getWfinstance().getWfinstancename();
            this.set("wfinstancenamedirtyflag",true);
        }
        return this.wfinstancename;
    }
    /**
     *  重置属性值[流程实例]
     */
    public void resetWfinstancename(){
        this.set("wfinstancenamedirtyflag",false);
        this.wfinstancename = null;
    }
    /**
     *  设置属性值[执行步骤]
     *  @param wfplogicname
     */
    public void setWfplogicname(String wfplogicname){
        if(StringUtils.isEmpty(wfplogicname))
            wfplogicname=null;
        this.wfplogicname = wfplogicname;
        this.set("wfplogicnamedirtyflag",true);
    }
    /**
     *  获取属性值[执行步骤]
     */
    public String getWfplogicname(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfplogicname)&&(!StringUtils.isEmpty(this.getWfstepid())) && this.getWfstep()!=null)
        {
            this.wfplogicname = this.getWfstep().getWfplogicname();
            this.set("wfplogicnamedirtyflag",true);
        }
        return this.wfplogicname;
    }
    /**
     *  重置属性值[执行步骤]
     */
    public void resetWfplogicname(){
        this.set("wfplogicnamedirtyflag",false);
        this.wfplogicname = null;
    }
    /**
     *  设置属性值[工作流步骤数据标识]
     *  @param wfstepdataid
     */
    public void setWfstepdataid(String wfstepdataid){
        if(StringUtils.isEmpty(wfstepdataid))
            wfstepdataid=null;
        this.wfstepdataid = wfstepdataid;
        this.set("wfstepdataiddirtyflag",true);
    }
    /**
     *  获取属性值[工作流步骤数据标识]
     */
    public String getWfstepdataid(){
        return this.wfstepdataid;
    }
    /**
     *  重置属性值[工作流步骤数据标识]
     */
    public void resetWfstepdataid(){
        this.set("wfstepdataiddirtyflag",false);
        this.wfstepdataid = null;
    }
    /**
     *  设置属性值[流程操作]
     *  @param wfstepdataname
     */
    public void setWfstepdataname(String wfstepdataname){
        if(StringUtils.isEmpty(wfstepdataname))
            wfstepdataname=null;
        this.wfstepdataname = wfstepdataname;
        this.set("wfstepdatanamedirtyflag",true);
    }
    /**
     *  获取属性值[流程操作]
     */
    public String getWfstepdataname(){
        return this.wfstepdataname;
    }
    /**
     *  重置属性值[流程操作]
     */
    public void resetWfstepdataname(){
        this.set("wfstepdatanamedirtyflag",false);
        this.wfstepdataname = null;
    }
    /**
     *  设置属性值[步骤数据_相关步骤]
     *  @param wfstepid
     */
    public void setWfstepid(String wfstepid){
        if(StringUtils.isEmpty(wfstepid))
            wfstepid=null;
        this.wfstepid = wfstepid;
        this.set("wfstepiddirtyflag",true);
    }
    /**
     *  获取属性值[步骤数据_相关步骤]
     */
    public String getWfstepid(){
        return this.wfstepid;
    }
    /**
     *  重置属性值[步骤数据_相关步骤]
     */
    public void resetWfstepid(){
        this.set("wfstepiddirtyflag",false);
        this.wfstepid = null;
    }
    /**
     *  设置属性值[步骤语言资源]
     *  @param wfsteplanrestag
     */
    public void setWfsteplanrestag(String wfsteplanrestag){
        if(StringUtils.isEmpty(wfsteplanrestag))
            wfsteplanrestag=null;
        this.wfsteplanrestag = wfsteplanrestag;
        this.set("wfsteplanrestagdirtyflag",true);
    }
    /**
     *  获取属性值[步骤语言资源]
     */
    public String getWfsteplanrestag(){
        return this.wfsteplanrestag;
    }
    /**
     *  重置属性值[步骤语言资源]
     */
    public void resetWfsteplanrestag(){
        this.set("wfsteplanrestagdirtyflag",false);
        this.wfsteplanrestag = null;
    }
    /**
     *  设置属性值[步骤名称]
     *  @param wfstepname
     */
    public void setWfstepname(String wfstepname){
        if(StringUtils.isEmpty(wfstepname))
            wfstepname=null;
        this.wfstepname = wfstepname;
        this.set("wfstepnamedirtyflag",true);
    }
    /**
     *  获取属性值[步骤名称]
     */
    public String getWfstepname(){
        //填充物理化的外键值附加数据
        if(StringUtils.isEmpty(this.wfstepname)&&(!StringUtils.isEmpty(this.getWfstepid())) && this.getWfstep()!=null)
        {
            this.wfstepname = this.getWfstep().getWfstepname();
            this.set("wfstepnamedirtyflag",true);
        }
        return this.wfstepname;
    }
    /**
     *  重置属性值[步骤名称]
     */
    public void resetWfstepname(){
        this.set("wfstepnamedirtyflag",false);
        this.wfstepname = null;
    }
     /**
     *  获取主实体关联数据[WFInstance]
     */
    public WFInstance getWfinstance() {
        return wfinstance;
    }
    /**
     *  设置主实体关联数据[WFInstance]
     */
    public void setWfinstance(WFInstance wfinstance) {
        this.wfinstance = wfinstance;
    }

     /**
     *  获取主实体关联数据[WFStep]
     */
    public WFStep getWfstep() {
        return wfstep;
    }
    /**
     *  设置主实体关联数据[WFStep]
     */
    public void setWfstep(WFStep wfstep) {
        this.wfstep = wfstep;
    }

     /**
     *  获取主实体关联数据[WFUser]
     */
    public WFUser getOriginalwfuser() {
        return originalwfuser;
    }
    /**
     *  设置主实体关联数据[WFUser]
     */
    public void setOriginalwfuser(WFUser originalwfuser) {
        this.originalwfuser = originalwfuser;
    }

    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetActiontime();
        resetActorid();
        resetActorname();
        resetActorname2();
        resetConnectionname();
        resetCreatedate();
        resetCreateman();
        resetMemo();
        resetNextto();
        resetOriginalwfuserid();
        resetOriginalwfusername();
        resetSdparam();
        resetSdparam2();
        resetUpdatedate();
        resetUpdateman();
        resetUserdata();
        resetUserdatadesc();
        resetWfactionlanrestag();
        resetWfinstanceid();
        resetWfinstancename();
        resetWfplogicname();
        resetWfstepdataid();
        resetWfstepdataname();
        resetWfstepid();
        resetWfsteplanrestag();
        resetWfstepname();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
	    //随机生成主键
         return  IdWorker.get32UUID();

    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public WFStepData copyTo(WFStepData targetEntity)
	{
		BeanCopier copier=BeanCopier.create(WFStepData.class, WFStepData.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetWfstepdataid();
		return targetEntity;
	}
}